<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>CRUD</title>
</head>
<body>
<a th:href="@{/toAdd}">添加</a>
        <table border="1" cellspacing="0">
            <tr>
                <td>ID</td>
                <td>姓名</td>
                <td>年龄</td>
                <td>部门</td>
                <td>操作</td>
            </tr>
            <tr th:each="e : ${elist}">
                <td th:text="${e.id}"></td>
                <td th:text="${e.name}"></td>
                <td th:text="${e.age}"></td>
                <td th:text="${e.dname}"></td>
                <td>
                    <a th:href="@{/del/(id=${e.id})}">删除</a>
                    <a th:href="@{/toUpdate/(id=${e.id})}">修改</a>
                </td>
            </tr>
        </table>
</body>
</html>